<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3D</title>
    <style>
        html,
        body {
            margin: 0;
            overflow: hidden;    
            background-color: #ccc;
        }
        .camera {
            perspective: 250px;
            perspective-origin:50% 50%;
        }
        .space {
            width: 500px;
            height: 500px;
            margin: 0 auto;
            transform-style: preserve-3d;
        }
        .space img {
            width: 500px;
            height: 500;
            position: absolute;
        }
        .space .front {
            transform: rotateZ(0) rotateY(0) rotateZ(0) translateZ(-250px);
        }
        .space .left {
            transform: rotateY(90deg) translateZ(-250px);
        }
        .space .right {
            transform: rotateY(-90deg) translateZ(-250px);
        }
        .space .bottom {
            transform: rotateX(90deg) translateZ(-250px);
        }
        .space .back {
            transform: rotateY(180deg) translateZ(-250px);
        }
        .space .top {
            transform: rotateX(-90deg) translateZ(-250px);
        }
        @keyframes rot {
            0% {
                transform: rotateY(0deg)
            }

            10% {
                transform: rotateY(90deg)
            }

            25% {
                transform: rotateY(90deg)
            }

            35% {
                transform: rotateY(180deg)
            }

            50% {
                transform: rotateY(180deg)
            }

            60% {
                transform: rotateY(270deg)
            }

            75% {
                transform: rotateY(270deg)
            }

            85% {
                transform: rotateY(360deg)
            }

            100% {
                transform: rotateY(360deg)
            }
        }
        /*为立方体加上帧动画*/
        .space {
            animation: rot 8s ease-out 0s infinite forwards;
        }
    </style>
</head>
<body>
    <div class="camera" id="camera">
        <div class="space">
            <img class="front" src="https://yun.dui88.com/tuia/junhehe/skybox/front.jpg" alt="" />
            <img class="front" src="https://yun.dui88.com/tuia/junhehe/skybox/front.jpg" alt="" />
            <img class="back" src="https://yun.dui88.com/tuia/junhehe/skybox/back.jpg" alt="" />
            <img class="left" src="https://yun.dui88.com/tuia/junhehe/skybox/left.jpg" alt="" />
            <img class="right" src="https://yun.dui88.com/tuia/junhehe/skybox/right.jpg" alt="" />
            <img class="bottom" src="https://yun.dui88.com/tuia/junhehe/skybox/bottom.jpg" alt="" />
            <img class="top" src="https://yun.dui88.com/tuia/junhehe/skybox/top.jpg" alt="" />
        </div>
    </div>
</body>
</html>